#define _CRT_SECURE_NO_WARNINGS 1


#include<string>
#include<iostream>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int size = s.size();
	int left = 0, right = 0;
	while (right < size)
	{
		while (s[right] == s[left] || s[right] == s[left] + 32 || s[right] == s[left] - 32)
		{
			right++;
		}
		if (s[left] >= 'a' && s[left] <= 'z')
		{
			printf("(%c,%d)", s[left] - 32, right - left);
		}
		else
		{
			printf("(%c,%d)", s[left], right - left);
		}
		left = right;
		right++;
	}

	return 0;
}